﻿using System;
using Ayatta.Contract.Domain;

namespace Web.Base.OAuth
{
    public static class OAuthClientFactory
    {
        public static IOAuthClient Create(OAuthConfig config)
         {
             switch (config.ClientName.ToLower())
             {
                 case "qq":
                     return new QqClient(config);
                 case "sina":
                     return new SinaClient(config);
                 default: throw new NotSupportedException();
             }
         }
    }
}